<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./jq-3.6.0.js"></script>
</head>

<body>
    <a href="www.baidu.com">百度一下</a>
</body>
<script>
    var a1 = $('a').prop('href');
    console.log(a1);
    $('a').prop('href', 'aaaaaaaa')
    $('a').attr('data-index', 1)
    console.log($('a').attr('data-index'));
    $('a').data('data-id', '123');
    console.log($('a'));
</script>

</html>